<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="org.lys.model.User" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户</title>
    <meta http-equiv = "Content-Type" content = "text/html; charset=utf-8">  
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <center>
  	<a href="user/editUser.jsp">添加用户</a>
  	<table border="1px" cellpadding="5" cellspacing="0" style="width: 600px">
  		<tr>
  			<td>Id</td>
  			<td>姓名</td>
  			<td>操作</td>
  		</tr>
  		<c:forEach var="user" items="${users}">
  			<tr>
	  			<td><c:out value="${user.id}" escapeXml="false"/></td>
	  			<td><c:out value="${user.name}" escapeXml="false"/></td>
	  			<td>&nbsp;&nbsp;&nbsp;<a href="UserServlet?kind=preUpdate&id=<c:out value="${user.id}" escapeXml="false"/>">修改</a>&nbsp;&nbsp;&nbsp;<a href="UserServlet?kind=delete&id=<c:out value="${user.id}" escapeXml="false"/>">删除</a></td>
  			</tr>
  		</c:forEach>
  	</table>
  	${navigation}
  	</center>
  </body>
</html>
